using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DesignPattern_Builder;
using System;
using System.Text;

public class BuilderTest_1 : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        //方法调用
        UnitTest_1();
    }
    void UnitTest_1()
    {
        //建立
        Director_1 theDirectoir = new Director_1();
        Product_1 theProduct = null;

        //使用BuilderA建立
        theDirectoir.Construct(new ConcreteBuilderA_1());
        theProduct = theDirectoir.GetResult();
        theProduct.ShowProduct();

        //使用BuilderB建立
        theDirectoir.Construct(new ConcreteBuilderB_1());
        theProduct = theDirectoir.GetResult();
        theProduct.ShowProduct();
    }
    // Update is called once per frame
    void Update()
    {

    }
    
}
